# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=html-xml-utils
pkgver=8.6
pkgrel=0
pkgdesc="A number of simple utilities for manipulating HTML and XML files."
url="https://www.w3.org/Tools/HTML-XML-utils/"
arch="all"
license="W3C"
checkdepends="netcat-openbsd"
subpackages="$pkgname-doc"
source="https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub

	# install licence to licenses instead; disable auto install
	sed -e "/doc_DATA = COPYING/d" \
	-i Makefile.in
}

build() {
	./configure \
		--host=$CHOST \
		--build=$CBUILD \
		--prefix=/usr \
		--disable-dependency-tracking
	make
}

check() {
	make check
}

package() {
	make install DESTDIR="$pkgdir"
	install -D -m 644 COPYING \
		"$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
0050b789a4921fa66b863255f1fd1ef9826e4b778ebc6dc67592fe854ec314b13cd8b162af67dae204018867966cfd5cb9822345917d3de3dc76c797bc0d2ec1  html-xml-utils-8.6.tar.gz
"
